package com.example.demo.util.converters.impl;

import com.example.demo.util.NumberUtil;
import com.example.demo.util.converters.MyConverter;
import org.springframework.stereotype.Component;


import java.lang.reflect.Field;
import java.math.BigDecimal;

/**
 * @author 陈浩
 * @date 2021/1/9 15:22
 */
public class BigDecimalMyConverter implements MyConverter<BigDecimal> {
    @Override
    public BigDecimal convertToJavaData(String value, Field declaredField) throws Exception {
        return NumberUtil.parseBigDecimal(value, declaredField);
    }
}
